class PC {
    CPU cpu;
    HardDisk hardDisk;
    void setCPU(CPU c) {
        cpu = c;
    }

    void setHardDisk(HardDisk h) {
        hardDisk = h;
    }

    void show(){
        System.out.println("speed="+cpu.getSpeed()+"       HardDisk="+hardDisk.getAmount());
        System.out.println("cpu是否等于HardDisk："+cpu.equals(hardDisk));
        String ii=cpu.toString();
        System.out.println(ii);
    }
}

